import request from './request'

// export default id => {
//     console.log('1' + id);
//     request.get("/products/" + id).then((data) => {
//         const res = data.data.data
//         console.log(res.nav);
//     })
// }
// 这个导出如果不是默认导出，导入的时候需要花括号,export 是默认导出
export const getData = (id) => request.get("/products/" + id)
// export const getData = (id) => { return request.get("/products/" + id) }
// 商品搜索（含首页的“更多”）  /products
export const getGoodsFun = (params)=>{return request.get('/products',{params})};
export const getRecommendFun = ()=>{return request.get('/products/recommend')};
// /products/hot   热门兑换
export const getHotFun = ()=>{return request.get('/products/hot')};

export const getMoreFun = (params)=>{ return request.get(`/products`,{params})};
// 调用,名称需要和方法一样
// import {getData} from '@/request/api'
// getData(129)

